from flask import Flask, render_template
import config
from exts import db,mail,mysql
from blueprints.log import bp as randl
from blueprints.search import bp as search
from models import UserModel
app = Flask(__name__)
app.config.from_object(config)
db.init_app(app)
mail.init_app(app)
app.register_blueprint(randl)#蓝图
app.register_blueprint(search)#蓝图
#路由函数写到蓝图里面

if __name__ == '__main__':
    app.run(debug=True, host='127.0.0.1', port='8000')

